PI Manager Catalog & Meta-Url

PI Manager uses ocpn-plugins.xml to provide the required metadata and URLs for installation of plugins.

Ocpn-plugins.xml and associated metadata files are located in https://github.com/OpenCPN/plugins/

Batch files and scripts are available to help create this file ocpn-plugins.xml is created from the individual plugin metadata files located in the data directory.

Please review the Readme file.

In summary

  1. ocpn-plugins.xml is maintained within the project https://github.com/OpenCPN/plugins
  2. Users can download updated versions directly from github (=this project https://github.com/OpenCPN/plugins).
  3. Devs can clone this repo and create their own variant which is accessible from the GU using a custom URL.
  4. Devs can issue PR:s against this repo to have their updates incorporated in the main ocpn-plugins-xml.
  5. Dave has access to build the ocpn-plugins.xml in the master branch of the repository.

The scripts require Python

Create a Meta-url on Alpha Branch

META-URL's are only accepted on the github.com/opencpn/plugins/Alpha Branch.

  1. From your local Github repository git clone https://github.com/[Your Git Name]/OpenCPN/plugins.git
  2. Then git checkout Alpha to go to the Alpha branch.
  3. From the Alpha branch create your own corresponding branch, git checkout -b [your-name-or-plugin]-alpha which will contain your testing metadata.xml's.
  4. Now go back to the Alpha branch git checkout Alpha to create your own META-URL xml file.
  5. Create and add your own xml file in [github user]/plugins/Alpha/metadata alongside the other Plugin Dev xml files. This file will have META-URL redirect to your new branch. Example follows:
  6. In this case the path & path is [github user]/plugins/Alpha/metadata/meta-url-alpha-seandepagnier-rgleason.xml
  7. The text in the xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<opencpn-plugin version="1">
  <name> Sean Depagnier Alpha Plugins meta-url </name>
  <version> 1.0 </version>
  <summary> meta-url to Sean's Alpha Plugins by rgleason </summary>
    <meta-url> https://raw.githubusercontent.com/rgleason/plugins/rg-alpha/ocpn-plugins.xml </meta-url>
</opencpn-plugin>
  1. Check the new file for format, accuracy and complete tags.
  2. Next run the python tool to build a new ocpn-plugins.xml by executing at the command prompt from the /plugins/ directory
    python tools/ocpn-metadata generate –force –userdir metadata –destfile ocpn-plugins.xml . This command collects all the files into one file. You will need to have python configured on your computer.
  3. Then check that Alpha branch has a good ocpn-plugins.xml containing the xml data needed to direct to the cloud sources, including yours and other plugin meta-url redirects.
  4. Now git push your changes to the Alpha branch up to your remote repository, and then push it to opencpn/plugins/Alpha.
  5. Wait for your PR to be accepted.
  6. Your new private branch [github user]/plugins branch:[your name]-alpha now needs to be populated with metadata xmls from your Cloudsmith directory. In my case the branch is github.com/rgleason/OpenCPN/plugins/rg-alpha
  7. Now copy Cloudsmith metadata xml files for plugins into
    github.com/rgleason/OpenCPN/plugins/rg-alpha/metadata
  8. Check those xml for format and complete tags.
  9. Then collect the metadata xmls into a new ocpn-plugins.xml file with
    python tools/ocpn-metadata generate –force –userdir metadata –destfile ocpn-plugins.xml
    Note order of xml data may change, causing it to appear that the PR has more changes than it actually does.
  10. Then push the new files in that branch up to your remote, so that there are some metadata.xml files for your new META-URL in the Alpha branch to link to, so that you can test some plugins in the current Developer's version of Opencpn.

#19 Pull Request from opencpn/plugins/rgleason:rg-alpha to opencpn/plugins:Alpha

Also here is another example with squiddio